You really define the variable twice. Remove the definition inside of main.cpp and the error should go away.